home *** CD-ROM | disk | FTP | other *** search
/ Info-Mac 4 / Info_Mac IV CD-ROM (Pacific HiTech Inc.)(August 1994).iso / Communications / General / Avtek ARA Scripts V1.1 / Avtek Mini PocketFax CD970 < prev    next >
Text File  |  1994-04-06  |  3KB  |  179 lines

  1. ! "Avtek Mini PocketFax CD970 - 6th April 1994 - NJS - v1.1
  2. !
  3. @ORIGINATE
  4. @ANSWER
  5. !
  6. @LABEL 1
  7. serreset 2400, 0, 8, 1
  8. DTRset
  9. !
  10. ! first recall the factory configuration
  11. !
  12. matchclr
  13. settries 0
  14. matchstr 1 3 "OK"
  15. @LABEL 2
  16. write "AT&F\13"
  17. matchread 30
  18. inctries
  19. iftries 2 59
  20. jump 2
  21. !
  22. ! Next, Set up the default configuration and Echo off
  23. !
  24. @LABEL 3
  25. matchstr 1 4 "OK"
  26. pause 5
  27. write "ATB0+C61&C1&P1X1E0\13"
  28. matchread 30
  29. jump 59
  30. !
  31. ! Next, Setup to ignore DTR 
  32. !
  33. @LABEL 4
  34. matchstr 1 5 "OK\13\10"
  35. matchstr 2 59 "ERROR\13\10"
  36. write "AT&D0\13"
  37. matchread 30
  38. !
  39. ! If speaker on flag is true, jump to label 8.  Else turn off the speaker
  40. !
  41. @LABEL 5
  42. matchclr
  43. ifstr 2 8 "1"
  44. matchstr 1 8 "OK\13\10"
  45. write "ATM0\13"
  46. matchread 30
  47. jump 59
  48. !
  49. ! The modem is ready.  So enable answering, or originate a call
  50. !
  51. @LABEL 8
  52. ifANSWER 30
  53. note "Dialing ^1" 3
  54. write "ATS0=0DT^1\13"
  55. !
  56. @LABEL 9
  57. matchstr  1 11 "CONNECT 1200\13\10"
  58. matchstr  2 12 "CONNECT 2400\13\10"
  59. matchstr  3 50 "NO CARRIER\13\10"
  60. matchstr  4 50 "ERROR\13\10"
  61. matchstr  5 52 "NO DIALTONE\13\10"
  62. matchstr  6 53 "BUSY\13\10"
  63. matchstr  7 54 "NO ANSWER\13\10"
  64. matchread 700
  65. jump 59
  66. !
  67. @LABEL 11
  68. note "Communicating at 1200 bps." 2
  69. serreset 1200, 0, 8, 1
  70. jump 16
  71. !
  72. @LABEL 12
  73. note "Communicating at 2400 bps." 2
  74. serreset 2400, 0, 8, 1
  75. jump 16
  76. !
  77. @LABEL 16
  78. ifANSWER 17
  79. pause 30
  80. @LABEL 17
  81. exit 0
  82. !
  83. @LABEL 30
  84. pause 5
  85. write "ATS0=2\13"
  86. matchstr 1 31 "OK\13\10"
  87. matchread 30
  88. jump 59
  89. !
  90. @LABEL 31
  91. matchstr 1  32 "RING\13\10"
  92. matchstr 2  11 "CONNECT 1200\13\10"
  93. matchstr 3  12 "CONNECT 2400\13\10"
  94. matchstr 4  50 "NO CARRIER\13\10"
  95. matchstr 5  50 "ERROR\13\10"
  96. matchstr 6  52 "NO DIALTONE\13\10"
  97. matchstr 7  53 "BUSY\13\10"
  98. matchstr 8  54 "NO ANSWER\13\10"
  99. matchread 700
  100. jump 31
  101. !
  102. @LABEL 32
  103. userhook 1
  104. note "Answering phone…" 2
  105. jump 31
  106. !
  107. ! 50: error messages
  108. !
  109. @LABEL 50
  110. exit -6021
  111. !
  112. @LABEL 52
  113. exit -6020
  114. !
  115. @LABEL 53
  116. exit -6022
  117. !
  118. @LABEL 54
  119. exit -6023
  120. !
  121. @LABEL 59
  122. exit -6019
  123. !
  124. ! Hang up the modem
  125. !
  126. @HANGUP
  127. @LABEL 60
  128. settries 0
  129. @LABEL 61
  130. write "ATH0\13"
  131. matchclr
  132. matchstr 1 64 "OK\13\10"
  133. matchstr 2 63 "NO CARRIER\13\10"
  134. matchstr 3 64 "ERROR\13\10"
  135. matchread 15
  136. inctries
  137. iftries 3 64
  138. ! no response, try escape sequence
  139. pause 10
  140. matchclr
  141. matchstr 1 62 "OK\13\10"
  142. write "+++"
  143. matchread 18
  144. ! No response from modem, toggle DTR
  145. !
  146. DTRClear
  147. pause 10
  148. DTRSet
  149. jump 61
  150. !
  151. @LABEL 62
  152. matchclr
  153. matchstr 1 64 "OK\13\10"
  154. matchstr 2 63 "NO CARRIER\13\10"
  155. write "ATH0\13"
  156. matchread 50
  157. jump 61
  158. !
  159. @LABEL 63
  160. pause 45
  161. flush
  162. !
  163. ! Recall the factory settings
  164. !
  165. @LABEL 64
  166. matchclr
  167. matchstr 1 65 "OK\13\10"
  168. write "AT&F\13"
  169. matchread 30
  170. !
  171. @LABEL 65
  172. matchstr 1 66 "OK\13\10"
  173. write "ATS0=0\13"
  174. matchread 30
  175. !
  176. @LABEL 66
  177. exit 0
  178.  
  179.